package com.study.designPattern.observer.example3;

import java.util.Observer;

/**
 * @Author HBZ
 * @Date 2020/7/21 17:21
 * @Description
 */
public class Test {
    public static void main(String[] args)
    {
        OilFutures oil=new OilFutures();
        Observer bull=new Bull(); //多方
        Observer bear=new Bear(); //空方
        oil.addObserver(bull);
        oil.addObserver(bear);
        oil.setPrice(10);
        oil.setPrice(-8);
    }

}
